﻿namespace FlexConta.BusinessLogic.Configurations
{
    using FlexPlatform.BusinessLogic.DataModel;
    using FlexPlatform.Common.Configuration;
    using FlexConta.DataAccess.DataModel;
    using System.Collections.ObjectModel;

    using FlexPlatform.DataModel.Validation.Generic_ValidationRules;
    using FlexPlatform.Shared.Configuration;
    using FlexPlatform.Shared.DataModel;
    using FlexPlatform.Common;

    internal class AdresaConfigurator 
    {
        public void SetUp()
        {
            var x = new ValidationRuleConfiguration() { ValidationRule = null };
            var y = new PropertyValidationConfiguration<Adresa>(a => a.Detalii);

            var yy = new PropertyValidationConfiguration<object>(a => a.GetType());

            SystemGlobal.Configuration.RegisterConfigurationElement<Adresa>(x);
            SystemGlobal.Configuration.RegisterConfigurationElement<Adresa>(yy);

            var r = SystemGlobal.Configuration.GetConfigurationElementsOfType<ValidationRuleConfiguration>(typeof(Adresa));

        }
    }
}
